package com.fxd.shopping.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fxd.core.util.PageUtils;
import com.fxd.model.product.AttrEntity;
import com.fxd.shopping.product.dto.AttrInfoDTO;
import com.fxd.shopping.product.param.AttrGroupRelationDelAndAddParam;
import com.fxd.shopping.product.param.AttrSaveParam;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author fuxdong
 * @email 2016335176@qqcom
 * @date 2021-07-17 09:59:25
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrSaveParam attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrInfoDTO getAttrInfo(Long attrId);

    void updateAttr(AttrSaveParam attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(List<AttrGroupRelationDelAndAddParam> param);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    /**
     * 在指定属性集合，挑出检索属性
     *
     * @param attrIds
     * @return
     */
    List<Long> findSearchAttrsIds(List<Long> attrIds);

}

